﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BizWeb.Models.Site_Post>>" %>
<%@ Import Namespace="BizWeb.Core.Helpers"%>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Home Page
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">

    <div class="hslice" id="firstSlice">
        <h2 class="entry-title">Recent Posts</h2>
        <div class="entry-content">
        <% foreach (var item in Model) { %>
            <span id="title"><%=Html.ActionLink(item.Title, "Details", "Posts", new{year = item.DatePublished.Value.Year, month = item.DatePublished.Value.Month, 
                    day = item.DatePublished.Value.Day, slug = item.Slug}, null) %></span><br />
            <span id="date"><%=Html.Encode(item.DatePublished) %></span><br />
            <%=Html.TextAbstract(item.PlainContent, 50) %>
            <br /><br />    
        <% } %>
        </div>
    </div>
    
    <h2>Developer Quiz</h2>
    <script src="../../scripts/jquery.quiz.js" type="text/javascript"></script>
    <script src="../../scripts/jquery.quiz.init.js" type="text/javascript"></script>
    <div class="quiz"></div>
</asp:Content>